/** @format */

import axios from '@/utils/request'
// import qs from 'qs'

// 出库记录分页查询
export function pageList(params) {
  return axios.get('/rfid/outBill/page', { params: params })
}

// 出库单延期归还
export function delayedReturn(data) {
  return axios.post('/rfid/outBill/delayedReturn', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}

// 出库记录详情
export function getDetail(billNumber) {
  return axios.get('/rfid/outBill/queryOne', { params: { billNumber: billNumber } })
}

// 出库单 删除
export function del(billNumber) {
  return axios.delete('/rfid/outBill/del', { params: { billNumber: billNumber } })
}

// 档案出库
export function archivesOut(data) {
  return axios.post('/rfid/outBill/archivesOut', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}

// 档案盒出库
export function boxOut(data) {
  return axios.post('/rfid/outBill/boxOut', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}

// 确认出库
export function confirmOut(data) {
  return axios.post('/rfid/outBill/confirmOut', data, {
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
  })
}

// 拒绝出库
export function refuseOut(data) {
  return axios.post('/rfid/outBill/refuseOut', data, {
    headers: {
      'Content-Type': 'application/json',
    },
  })
}

// 逾期分页查询
export function overduePage(params) {
  return axios.get('/rfid/outBillDetails/overduePage', { params: params })
}

// 延期归还记录分页查询
export function outDelayedPage(params) {
  return axios.get('/rfid/outDelayed/page', { params: params })
}
